<?php

namespace App\Common;

use App\Constants\DataCode;
use App\Service\common\webSocketServer;
use Hyperf\Config\Annotation\Value;

trait SendTalkMsgUtils
{
    /**
     * 发送对话相关信息
     * @param int $fd
     * @param array $params
     */
    public function sendMessageTalk(int $fd, array $params)
    {
        $data = $params;
        var_dump('---------发送设备任务数据');
        var_dump($data);
        return make(webSocketServer::class)->send($fd, str_replace("\/", "/", json_encode($data,256)));
    }

}